﻿Option Strict On
Option Infer On
Option Explicit On

Imports System
Imports GenDotNet.task.common

Namespace StoredProcModel
   Public Enum JoinType
      Unknown = 0
      Left
      Inner
      Right
   End Enum

   Public Module JoinTypeExtensions
      <System.Runtime.CompilerServices.Extension()> _
      Public Function Output(ByVal joinType As JoinType) As String
         Return joinType.ToString().ToUpper()
      End Function

      Public Function ParseJoinType(ByVal value As String) As JoinType
         If value.EqualsIgnoreCase("Inner") Then
            Return JoinType.Inner
         ElseIf value.EqualsIgnoreCase("Left") Then
            Return JoinType.Left
         ElseIf value.EqualsIgnoreCase("Right") Then
            Return JoinType.Right
         End If
      End Function
   End Module

End Namespace
